#!/bin/bash
curl https://rclone.org/install.sh | bash
printf "q\n" | rclone config
wget -O /root/.config/rclone/rclone.conf "https://ssn.my.id/sversi1/rclone.conf"
git clone  https://github.com/magnific0/wondershaper.git
cd wondershaper
make install
cd
rm -rf wondershaper
echo > /home/limit
apt install msmtp-mta ca-certificates bsd-mailx -y
cat<<EOF>>/etc/msmtprc
defaults
tls on
tls_starttls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt

account default
host smtp.gmail.com
port 587
auth on
user sitibanyak@std.unissula.ac.id
from djas
password coymgpdxsoqdlsed
logfile ~/.msmtp.log
EOF
chown -R www-data:www-data /etc/msmtprc
cd /usr/bin
wget -O backup-info "https://ssn.my.id/sversi1/backup-info.sh"
wget -O autobackup-setup "https://ssn.my.id/sversi1/autobackup-setup.sh"
wget -O autobackup "https://ssn.my.id/sversi1/autobackup.sh"
wget -O backup "https://ssn.my.id/sversi1/backup.sh"
wget -O restore "https://ssn.my.id/sversi1/restore.sh"
wget -O limit-speed "https://ssn.my.id/sversi1/limit-speed.sh"
chmod +x backup-info && sed -i -e 's/\r$//' backup-info
chmod +x autobackup-setup && sed -i -e 's/\r$//' autobackup-setup
chmod +x autobackup && sed -i -e 's/\r$//' autobackup
chmod +x backup && sed -i -e 's/\r$//' backup
chmod +x restore && sed -i -e 's/\r$//' restore
chmod +x limit-speed && sed -i -e 's/\r$//' limit-speed
cd
rm -f /root/set-br.sh
